package com.loong.shop.common.backend.param;

import com.loong.common.validator.group.CommonInsert;
import com.loong.common.validator.group.CommonUpdate;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class GoodsSkuParam {
    /**
     * 商品sku的id
     */
    @NotNull(message = "更新时商品sku的id不能为空",groups = {CommonUpdate.class})
    private Long id;
    /**
     * 商品id
     */
    @NotNull(message = "新增时商品id不能为空",groups = {CommonInsert.class})
    private Long goodsBaseId;

    /**
     * 规格组
     */
    @NotEmpty(message = "新增时商品规格组不能为空",groups = {CommonInsert.class})
    private List<Long> goodsSpecification;

    /**
     * 原价
     */
    @NotNull(message = "新增时原价不能为空",groups = {CommonInsert.class})
    private BigDecimal originPrice;

    /**
     * 现价
     */
    @NotNull(message = "新增时现价不能为空",groups = {CommonInsert.class})
    private BigDecimal currentPrice;

    /**
     * 库存
     */
    private Integer stock;

    /**
     * 商品状态(1销售中,2已售罄,3未开售,4下架)
     */
    private Integer status;

    /**
     * 市场价
     */
    private BigDecimal marketPrice;

    /**
     * 成本价
     */
    private BigDecimal costPrice;

    /**
     * 商品图片
     */
    private String specificationPics;

    /**
     * 创建时间
     */
   // @NotNull(message = "新增时创建时间不能为空",groups = {CommonInsert.class})
    private Date createTime;

    /**
     * 更新时间
     */
  //  @NotNull(message = "更新时更新时间不能为空",groups = {CommonUpdate.class})
    private Date lastUpdateTime;

    /**
     * 店铺id 用于库存redis key用
     */
    private Long shopId;
}